#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys

def main():
    for line in sys.stdin:
        in_degree = line.split('\t')[1]
        print '%s\t%s' % (in_degree, 1)

if __name__ == '__main__':
    main()     
    
